package com.haikesi.api.menuauthority.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
public class MenuAuthoritySearchVO implements Serializable {
    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "父ID")
    private String parentId;

    @ApiModelProperty(value = "权限名称")
    private String authorityName;

    @ApiModelProperty(value = "权限图标")
    private String authorityIcon;

    @ApiModelProperty(value = "权限唯一标识")
    private String authoritySign;

    @ApiModelProperty(value = "权限分类( 1.权限菜单；2.权限按钮)")
    private Integer authorityType;



    @ApiModelProperty(value = "页数")
    private Integer pageNum;
    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if(pageNum == null){
            pageNum = 1;
        }
        return pageNum;
    }
    public Integer getPageSize() {
        if(pageSize == null){
            pageSize = 20;
        }
        if(pageSize > 100){
            pageSize = 100;
        }
        return pageSize;
    }


}